package com.hsxc.cdz.monitor.bean.pile.v1_33;

import com.hsxc.cdz.base.util.BytesUtil;

/**
 * 
 * @author 陈钊
 *  充电桩主动上送的停止充电报文类
 */
public class CharageCeasePileMsg extends PileMessage {

	private int port; // 充电口号
	private int controll; // 控制类型
	private String cardNum; // 用户卡号
	private int chargeTime;// 累积充电时间，单位：minute
	private int SOCEnd;// 终止荷电状态,直流设备必填

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getControll() {
		return controll;
	}

	public void setControll(int controll) {
		this.controll = controll;
	}

	public String getCardNum() {
		return cardNum;
	}

	public void setCardNum(String cardNum) {
		this.cardNum = cardNum;
	}

	public int getChargeTime() {
		return chargeTime;
	}

	public void setChargeTime(int chargeTime) {
		this.chargeTime = chargeTime;
	}

	public int getSOCEnd() {
		return SOCEnd;
	}

	public void setSOCEnd(int sOCEnd) {
		SOCEnd = sOCEnd;
	}

	@Override
	public void getContentFromByte(byte[] data) {
		byte[] temp;
		temp = BytesUtil.getByte(0, 1, data);
		this.setPort(BytesUtil.bytesToIntSeq(temp));

		temp = BytesUtil.getByte(1, 1, data);
		this.setControll(BytesUtil.bytesToIntSeq(temp));

		temp = BytesUtil.getByte(2, 10, data);
		this.setCardNum(BytesUtil.bcdBytesToStr(temp));

		temp = BytesUtil.getByte(12, 2, data);
		this.setChargeTime(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(14, 1, data);
		this.setSOCEnd(BytesUtil.bytesToIntSeq(temp));
	}

}
